package com.ssy.lingxi.settle.accounts.model.vo.request;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 新增对账单VO
 * @author Saske
 * @date 2021/12/01
 * @version 2.0.0
 */
public class ReconciliationSaveVo implements Serializable {

    private static final long serialVersionUID = -8887960826739570038L;

    /**
     * （采购方）会员Id
     */
    @NotNull(message = "采购方会员Id要大于0")
    @Positive(message = "采购方会员Id要大于0")
    private Long buyerMemberId;

    /**
     * （采购方）会员角色Id
     */
    @NotNull(message = "采购方会员角色Id要大于0")
    @Positive(message = "采购方会员角色Id要大于0")
    private Long buyerRoleId;

    /**
     * 对账单摘要 最长60个字符
     */
    @NotBlank(message = "对账单摘要不能为空")
    @Size(max = 60, message = "对账单摘要最长60个字符")
    private String reconciliationAbstract;

    /**
     * 付款方
     */
    @NotBlank(message = "付款方不能为空")
    private String payer;

    /**
     * 收款方
     */
    @NotBlank(message = "收款方不能为空")
    private String payee;

    /**
     * 发起对帐方
     */
    @NotBlank(message = "发起对帐方不能为空")
    private String launchReconciliation;

    /**
     * 待对账金额（含税） 要大于等于0
     */
    @NotNull(message = "待对账金额（含税）要大于等于0")
//    @PositiveOrZero(message = "待对账金额（含税）要大于等于0")
    private BigDecimal reconciliationMoneyAmount;

    /**
     * 备注
     */
    @Size(max = 120, message = "备注最多120个字符")
    private String remark;

    /**
     * 账单明细附件
     */
    private List<ReconciliationFileSaveVo> files;

    /**
     * 待新增对账单行明细
     */
    @Valid
    @NotEmpty(message = "待新增对账单行明细不能为空")
    @Size(min = 1, message = "至少有一个待新增对账单行明细")
    private List<ReconciliationRowSaveVO> rows;


    public Long getBuyerMemberId() {
        return buyerMemberId;
    }

    public void setBuyerMemberId(Long buyerMemberId) {
        this.buyerMemberId = buyerMemberId;
    }

    public Long getBuyerRoleId() {
        return buyerRoleId;
    }

    public void setBuyerRoleId(Long buyerRoleId) {
        this.buyerRoleId = buyerRoleId;
    }


    public String getReconciliationAbstract() {
        return reconciliationAbstract;
    }

    public void setReconciliationAbstract(String reconciliationAbstract) {
        this.reconciliationAbstract = reconciliationAbstract;
    }

    public String getPayer() {
        return payer;
    }

    public void setPayer(String payer) {
        this.payer = payer;
    }

    public String getPayee() {
        return payee;
    }

    public void setPayee(String payee) {
        this.payee = payee;
    }

    public String getLaunchReconciliation() {
        return launchReconciliation;
    }

    public void setLaunchReconciliation(String launchReconciliation) {
        this.launchReconciliation = launchReconciliation;
    }

    public BigDecimal getReconciliationMoneyAmount() {
        return reconciliationMoneyAmount;
    }

    public void setReconciliationMoneyAmount(BigDecimal reconciliationMoneyAmount) {
        this.reconciliationMoneyAmount = reconciliationMoneyAmount;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<ReconciliationFileSaveVo> getFiles() {
        return files;
    }

    public void setFiles(List<ReconciliationFileSaveVo> files) {
        this.files = files;
    }

    public List<ReconciliationRowSaveVO> getRows() {
        return rows;
    }

    public void setRows(List<ReconciliationRowSaveVO> rows) {
        this.rows = rows;
    }
}
